appModule.component('nSizeOfMeeting', {

  templateUrl: 'components/meeting-info/size-of-meeting/size-of-meeting.template.html',

  controller: [
    '$scope',
    function($scope) {

      $scope.regAttendance = {
        regVal : 'default',
        regAttendanceList: [
          {name: 'default', tips: ''},
          {name: 'required', tips: '参会人数不能为空'},
          {name: 'pattern', tips: '人数必须是正整数'},
          {name: 'pass', tips: '√'}
        ]
      };
      $scope.regPrice = {
        regVal : 'default',
        regPriceList: [
          {name: 'default', tips: ''},
          {name: 'required', tips: '门票价格不能为空'},
          {name: 'pattern', tips: '请输入正确的价格'},
          {name: 'pass', tips: '√'}
        ]
      };

      $scope.change = function(reg,err){
        for(var attr in err){
          if(err[attr] == true){
            $scope[reg].regVal = attr;
            return;
          }
        }
        $scope[reg].regVal = 'pass';
      };



    },
  ]

});
